package com.jiyun.entity;

import javax.persistence.Id;
import javax.persistence.Transient;

public class Employee {
    @Id
    private Integer id;
    private String name;
    private Integer did;
    private Integer cid;
    @Transient
    private Dept dept;
    @Transient
    private City city;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getDid() {
        return did;
    }

    public void setDid(Integer did) {
        this.did = did;
    }

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }

    public City getCity() {
        return city;
    }

    public void setCity(City city) {
        this.city = city;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", did=" + did +
                ", cid=" + cid +
                ", dept=" + dept +
                ", city=" + city +
                '}';
    }

    public Employee(Integer id, String name, Integer did, Integer cid, Dept dept, City city) {
        this.id = id;
        this.name = name;
        this.did = did;
        this.cid = cid;
        this.dept = dept;
        this.city = city;
    }

    public Employee() {
    }
}
